package dao;

import java.util.List;

import entityJPA.Position;

/**
 * 
 * This interface defines the common methods for
 * JDBCPositionDAO and JPAPositionDAO classes.
 *
 */
public interface IPositionDAO {
	
	/**
	 * Inserts into database a new position.       
	 * @param position        
	 */
	public void insert(Position pos);
	
	/**
	 * Updates a position in database.
	 * @param position        
	 */
	public void update(Position pos);

	/**
	 * Deletes a position from database.
	 * @param position
	 */
	public void delete(Position pos);

	/**
	 * Finds a specific position given the primary key.
	 * @param idPosition
	 * @return a Position instance which has the same idPosition
	 */
	public Position findById(int id);
	
	/**
	 * Finds all position in database.
	 * @return List<Position>
	 */
	public List<Position> findAll();

}
